﻿using System;
using System.Runtime.InteropServices;

namespace PolymorphExample
{
    class Rectangle : Shape
    {
        public override void Draw()
        {
            //Расширить функционал
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("Draw a Rectangle");
            Console.ForegroundColor = ConsoleColor.White;
        }
    }

    class Circle : Shape
    {
        public override void Draw()
        {
            //Расширить функционал
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("Draw a Circle");
            Console.ForegroundColor = ConsoleColor.White;
        }
    }

    abstract class Shape
    {
        public int Width { get; set; }
        public int Height { get; set; }

        public abstract void Draw();

        public void PrintSizes()
        {
            Console.WriteLine("Height: {0}, Width: {1}", Height, Width);
        }

    }
}